from app import db

class Topic(db.Model):
    id = db.Column(db.Integer, primary_key=True,autoincrement=True)
    like_count = db.Column(db.Integer)
    comments_count = db.Column(db.Integer)
    title = db.Column(db.String)
    alt = db.Column(db.String,unique=True)
    username = db.Column(db.String)
    content = db.Column(db.String)
    photos = db.Column(db.String)
    author = db.Column(db.String)
    groupname =db.Column(db.String)
    updated = db.Column(db.DateTime)
    created = db.Column(db.DateTime)
    is_agent = db.Column(db.String)
    uid = db.Column(db.String)




class User(db.Model):
    __tablename__="user"
    id = db.Column(db.Integer, primary_key=True,autoincrement=True)
    username = db.Column(db.String)
    created = db.Column(db.DateTime)
    uid = db.Column(db.String)
    phone = db.Column(db.String)
    credibility = db.Column(db.String)